package com.prs.crm.service.doc.impl;

import java.io.Serializable;
import java.util.Collection;

import com.prs.crm.dao.doc.DocumentDao;
import com.prs.crm.domain.doc.Document;
import com.prs.crm.domain.pm.PmProject;
import com.prs.crm.domain.pm.PmStage;
import com.prs.crm.service.doc.DocumentService;
import com.prs.crm.service.impl.BaseServiceImpl;

public class DocumentServiceImpl extends BaseServiceImpl<Document,DocumentDao> implements DocumentService{

	@Override
	public void submitDocument(Document document) {
		// TODO Auto-generated method stub
		//Attachment attach = FileUtil.getInstance().createAttach(file, fileName);
		//document.setAttach(attach);
		this.save(document);
	}

	@Override
	public Collection<Document> getDocument(PmProject project, PmStage stage) {
		// TODO Auto-generated method stub
		return this.getDao().getDocument(project,stage);
	}

	@Override
	public Collection<Document> getDocument(PmProject project) {
		// TODO Auto-generated method stub
		return this.getDao().getDocument(project);
	}

	@Override
	public Collection<Document> getProjectCreateDoc(PmProject project) {
		// TODO Auto-generated method stub
		return this.getDao().getProjectCreateDoc(project);
	}

	@Override
	public void saveOrUpdate(Document document) {
		this.getDao().saveOrUpdate(document);
	}

	@Override
	public void del(Document ids) {
		this.getDao().del(ids);
	}

	@Override
	public Document getDocument(Serializable id) {
		// TODO Auto-generated method stub
		return this.getDao().getDocument(id);
	}

}
